|
|
|
|
|
|
|
(table continued from previous page) |
|
|
|
|
| Method | Applies To | Description | | Refresh | Forms, most controls | Allows you to refresh the contents of an object. Refresh can be used when youre in a tight loop and need to have the screen update a progress value. | | SetFocus | Forms, most controls | Used to set the input focus to a particular control or give a form focus. | | Show | Forms | Used to load and display a form. | | Zorder | Forms, most controls | Sets the Z coordinate of a particular object. The Z Order represents which window sits on top or beneath another window. This property can be used to bring a particular form to the front of the screen or to the back of the screen. |
|
|
|
|
|
|
Here are some examples of methods you can use with different controls: |
|
|
|
 |
|
|
|
|
frmEmployee.Show ' Display a form
frmEmployee.Move 0, 0 ' Move a form
txtFirst.SetFocus ' Set focus to a text box |
|
|
|
|
|
|
|
|
Visual Basic has many built-in functions for manipulating strings, numeric values, dates, and so on. Using these functions is a lot better than having to write the routines yourself. You also learned about some of the more useful methods built into forms and controls. |
|
|
|
|
|
|
|
|
1. Whats the function that determines whether one string is contained within another string? |
|
|
|
|
|
|
|
|
2. Whats the function that returns the current system date and time? |
|
|
|
|
|
|
|
|
3. Which function(s) return only the current system date as a string? |
|
|
|
|
|
|
|
|
4. Which function allows you to add days, months, quarters, and so on from a date? |
|
|
|
|
|